home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / dev / amos / AMCAFExa.lha / AMCAF_Examples / SetRainColour2.AMOS / SetRainColour2.amosSourceCode
Encoding:
AMOS Source Code  |  1996-01-17  |  1.4 KB  |  41 lines

  1. ' ************************************* Commands used: 
  2. ' *                                   * Set Rain Colour  
  3. ' *           Amcaf Examples          * =Qsin  
  4. ' *       Set Rain Colour 2 V1.1      *    
  5. ' *      Written by Chris Hodges      *  
  6. ' *                                   *  
  7. ' *************************************  
  8. '    
  9. ' Remove the annoying mouse pointer. 
  10. Hide 
  11. ' Load a nice iff picture first. Also quite nice on intel outside :) 
  12. 'Load Iff "Data/IntelOutside.iff",0
  13. Load Iff "Data/Beach.iff",0
  14. ' We don't want to see the scrolling margin, so we cut of the left side. 
  15. Screen Display 0,144,40,304,256
  16. Screen Offset 0,1,0
  17. ' Define a small rainbow.
  18. Set Rainbow 0,0,64,"","",""
  19. ' We misuse Set Rain Colour to get access to an other hardware register. 
  20. ' In this case, It's the scrollregister. 
  21.  Extension_8_1330 0,-63
  22. ' Fill the rainbow with some nice scroll values. 
  23. For A=0 To 63
  24.   ' The scrollvalue must lie between 0 and 15. 
  25.   S= Extension_8_1106(A*32,7)+7
  26.   ' The registers holds the scrollvalues for the even and the odd planes.
  27.   ' As we are not using dual playfield, we must set them to the same values. 
  28.   Rain(0,A)=S+S*16
  29. Next 
  30. RY=0
  31. Repeat 
  32.   Wait Vbl 
  33.   ' Display the rainbow. 
  34.   Rainbow 0,RY,Y Hard(-1),258
  35.   ' RY holds the base of the rainbow, and this value is increased all the time 
  36.   ' to scroll the rainbow up.
  37.   Add RY,1,0 To 63
  38. Until Inkey$=Chr$(27) or Mouse Key<>0
  39. Screen Close 0
  40. Rainbow Del : View : Wait Vbl 
  41. End